#ifndef WSCAIRCRAFTSJSON_H
#define WSCAIRCRAFTSJSON_H

#include "wscrequesthandler.h"

namespace FsxWebService {

//! Aircrafts as JSON data
class WscAircraftsJson : public WscRequestHandler
{
    Q_OBJECT
    Q_DISABLE_COPY(WscAircraftsJson)

private:
    //! Get the query parameters.
    /*! \param request
        \param parameter JSON parameter
        \param callback Callback function if used with JSONP
        \param isTest flag, indicating it is just a test request */
    void getParameters(HttpRequest &request, JsonParameter &parameter, QString &callback, bool &isTest);

public:
    //! Constructor
    /*! \param port
        \param serverUrl
        \param path
        \param parent Qt parent object */
    WscAircraftsJson(const int port, const QString &serverUrl, const QString &path, QObject *parent=0);
    //! Web server service method
    /*! \param request
        \param response */
    void service(HttpRequest& request, HttpResponse& response);

signals:
    //! All Aircrafts as JSON array
    /*! \param parameter JSON parameter
        \return JSON text */
    QString const signalAircraftsJsonArray(const JsonParameter &parameter);
};
}
#endif // WSCAIRCRAFTSJSON_H
